home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: encom@jolt.mpx.com.au (Encom Technology Sydney)
- Newsgroups: comp.std.c,comp.lang.c.moderated
- Subject: Re: Integral promotion.
- Followup-To: comp.std.c,comp.lang.c.moderated
- Date: 22 Feb 1996 21:42:40 -0600
- Organization: Microplex Pty Ltd
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4gjd3g$nt9@solutions.solon.com>
- References: <4fstj7$2l6@solutions.solon.com> <4fvgvb$e0t@solutions.solon.com> <4gfgfp$3k8@solutions.solon.com>
- NNTP-Posting-Host: solutions.solon.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Re: short = short + short causing a warning.
-
- This is all getting off the track. Since only a warning is generated this
- has very little to do with the standard. I think the point is why does
-
- short = short + short;
-
- generate a warning whereas
-
- int = int + int;
-
- does not. Both these statements are as prone to overflow as each other
- (although in the first case it may not happen until the int resulting
- from the addition is moved into the short if sizeof(int) > sizeof(short).
-
- The warning is even sillier since on the implementation mentioned
- ints and shorts are the same.
-